public abstract class Decorator extends Component {

    protected Component component;

    public Component getComponent() {
        return component;
    }

    public void setComponent(Component component) {
        this.component = component;
    }

    @Override
    public String operation() {
        if (component != null) {
            return component.operation();
        }
        return "";
    }
}
